@extends('home.common.layout')
@section('content')
    <link rel="stylesheet" href="/home/plugins/normalize-css/normalize.css" />
    <link rel="stylesheet" href="/home/plugins/bootstrap/dist/css/bootstrap.css" />
    <link rel="stylesheet" href="/home/css/page-learing-personal.css" />
    <div class="personal-header" style="background-image: url(/home/img/asset-temp1.jpg);">
        <div class="personal-info">
            <p>
                <h1>吴雪</h1>
            </p>
            <p>Web前端工程师 学习时长 48小时35分</p>
        </div>
        <!--<div class="container">-->
        <!--<div class="col-lg-2"><img src="/home/img/logoIco.png" alt=""></div>-->
        <!--<div class="col-lg-4 title text-left">学习中心</div>-->
        <!--<div class="col-lg-6 text-right"><input type="text" class="input-search" placeholder="输入查询关键词"><input type="submit" class="search-buttom"></div>-->
        <!--</div>-->
    </div>
    <!-- 页面 -->
    <div class="container" >
        @include('home.common.left')
        <div class="personal-content pull-right">
            <div class="personal-cont">
                <div class="top">
                    <div class="tit"><span>最近学习课程</span></div>
                    <div class="top-cont">
                        <div class="col-lg-8">
                            <div class="imgIco"><img src="/home/img/widget-timg.jpeg" width="50" height="50" alt=""></div>
                            <div class="title">继续学习 程序语言设计</div>
                            <div class="about">正在学习 使用对象 <span>结束日期: 2017.06.05</span></div>
                            <div class="rate">
                                <li class="active"></li>
                                <li></li>
                                <li></li>
                                <li></li><span>1/4 已完成部分</span></div>
                        </div>
                        <div class="col-lg-4 text-right">
                            <a href="#" class="btn btn-primary"> 继续学习</a>
                        </div>
                        <div class="clearfix"></div>
                    </div>
                </div>
                <div class="my-course">
                    <div class="tit"><span class="active hv-poin">我加入的课程</span><span class="nv-poin">我购买的课程</span></div>
                    <div class="cont">
                        <div class="col-lg-6">
                            <div class="item">
                                <div class="imgIco"><img src="/home/img/widget-timg.jpeg" width="50" height="50" alt=""></div>
                                <div class="title">iOS应用开发入门</div>
                                <div class="about">正在学习 使用对象</div>
                                <div class="time">结束日期: 2017.06.05</div>
                                <div class="rate">
                                    <li class="active"></li>
                                    <li></li>
                                    <li></li>
                                    <li></li><span>1/4 已完成部分</span></div>
                                <div class="text-center"><a href="#" class="btn btn-primary">继续学习</a></div>
                            </div>
                        </div>
                        <div class="col-lg-6">
                            <div class="item">
                                <div class="imgIco"><img src="/home/img/widget-timg.jpeg" width="50" height="50" alt=""></div>
                                <div class="title">iOS应用开发入门</div>
                                <div class="about">正在学习 使用对象</div>
                                <div class="time">结束日期: 2017.06.05</div>
                                <div class="rate">
                                    <li class="active"></li>
                                    <li></li>
                                    <li></li>
                                    <li></li><span>1/4 已完成部分</span></div>
                                <div class="text-center"><a href="#" class="btn btn-primary">继续学习</a></div>
                            </div>
                        </div>
                        <div class="col-lg-6">
                            <div class="item">
                                <div class="imgIco"><img src="/home/img/widget-timg.jpeg" width="50" height="50" alt=""></div>
                                <div class="title">iOS应用开发入门</div>
                                <div class="about">正在学习 使用对象</div>
                                <div class="time">结束日期: 2017.06.05</div>
                                <div class="rate">
                                    <li class="active"></li>
                                    <li></li>
                                    <li></li>
                                    <li></li><span>1/4 已完成部分</span></div>
                                <div class="text-center"><a href="#" class="btn btn-primary">继续学习</a></div>
                            </div>
                        </div>
                        <div class="clearfix"></div>
                    </div>
                </div>
<div class="my-collection">
    <div class="tit"><span>直播课程</span></div>
    @foreach($livecourse as $v)
    <div class="cont">
        <div class="col-lg-6">
                    @if(time()>=$v->start_at && time()<=$v->end_at)
                        <div class="item">
                        <div class="title">{{$v->name}}</div>
                        <div class="time">开始时间: {{date('Y-m-d H:i:s',$v->start_at)}}</div>
                        <div class="time">结束时间: {{date('Y-m-d H:i:s',$v->end_at)}}</div>
                        <div class="text-center">
                        <a href="#" class="btn btn-primary">进入直播间</a>
                            @else
                                <div class="item">
                                    <div class="title">{{$v->name}}</div>
                                    <div class="time">开始时间: {{date('Y-m-d H:i:s',$v->start_at)}}</div>
                                    <div class="time">结束时间: {{date('Y-m-d H:i:s',$v->end_at)}}</div>
                                    <div class="text-center">
                                        <p  class="btn btn-primary" readonly>直播已结束</p>
                    @endif
                </div>
            </div>
        </div>
    </div>
    @endforeach
    <div class="clearfix"></div>
</div>
            </div>
            <div class="go-problem-feedback">
                帮助和常见问题 <a href="#" class="">问题反馈</a>
            </div>
        </div>
    </div>
    <!-- 页面 css js -->
    <script type="text/javascript" src="/home/plugins/jquery/dist/jquery.js"></script>
    <script type="text/javascript" src="/home/plugins/bootstrap/dist/js/bootstrap.js"></script>
    <script>
        $(function() {
            $(window).scroll(function() {
                console.log($(this)[0].scrollY);
                if ($(this)[0].scrollY > 155) {
                    console.log(1);
                    $('.personal-nav').css({
                        'position': 'fixed',
                        'top': 10
                    });
                    $('.personal-nav img').css({
                        'width': '140',
                        'height': '140'
                    });
                } else if ($(this)[0].scrollY <= 155) {
                    console.log(2)
                    $('.personal-nav').css({
                        'position': 'relative',
                        'top': -160
                    });
                    $('.personal-nav img').css({
                        'width': '180',
                        'height': '180'
                    });
                };
            })
        })
    </script>
@endsection